package com.qfedu.util;

import com.qfedu.entity.AdinmEntity;
import com.qfedu.entity.OrderEntity;
import com.qfedu.entity.RolesEntity;
import com.qfedu.entity.RouteEntity;

import java.io.Serializable;
import java.util.List;

public class Page implements Serializable {
    //自定义分页查询
    private Integer pageNum;    //当前第几页
    private Integer pageSize;    //当前页几条数据
    private Integer pageCount;    //总共多少页
    private Integer count;     //总共多少条数据
    private List<OrderEntity> orderlist;   //查询记录
    private List<Integer> saledata;
    private List<AdinmEntity> adinmEntities;
    private List<RolesEntity> rolesEntities;

    public List<RolesEntity> getRolesEntities() {
        return rolesEntities;
    }

    public void setRolesEntities(List<RolesEntity> rolesEntities) {
        this.rolesEntities = rolesEntities;
    }

    public Page() {
    }

    public Page(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Page(Integer pageNum, Integer pageSize) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
    }

    public List<Integer> getSaledata() {
        return saledata;
    }

    public void setPageCount(Integer pageCount) {
        this.pageCount = pageCount;
    }

    public void setSaledata(List<Integer> saledata) {
        this.saledata = saledata;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPageCount() {
        return pageCount;
    }


    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
        this.pageCount=this.count%this.pageSize==0?this.count/this.pageSize:this.count/this.pageSize+1;
    }

    public List<OrderEntity> getOrderlist() {
        return orderlist;
    }

    public void setOrderlist(List<OrderEntity> orderlist) {
        this.orderlist = orderlist;
    }

    public int getStart(){
        return (this.pageNum-1)*this.pageSize;
    }

    public List<AdinmEntity> getAdinmEntities() {
        return adinmEntities;
    }

    public void setAdinmEntities(List<AdinmEntity> adinmEntities) {
        this.adinmEntities = adinmEntities;
    }
}
